package com.xyt.imei.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.luminary.common.framework.dao.GenericDao;
import com.luminary.common.framework.service.impl.GenericServiceImpl;
import com.xyt.imei.core.dao.TraceDao;
import com.xyt.imei.core.model.po.Trace;
import com.xyt.imei.core.service.TraceService;

@Service
public class TraceServiceImpl extends GenericServiceImpl<Trace, Integer> implements TraceService {

	@Autowired
	private TraceDao traceDao;
	
	@Override
	protected GenericDao<Trace, Integer> getGenericDao() {
		return this.traceDao;
	}
	
	@Override
	@Transactional
	public boolean addTrace(Trace trace) throws Exception {
		return traceDao.insertSelective(trace) == 1;
	}

}
